#!/usr/bin/env bash
set -euo pipefail

# 安装到 Vim 包管理路径（原生 Vim 8+）
TARGET="${HOME}/.vim/pack/vim-trainer/start/trainer"
mkdir -p "$(dirname "$TARGET")"

# 拷贝
rsync -a --delete ./ "$TARGET/"

echo "Installed to: $TARGET"
echo "Open Vim and run :helptags ~/.vim/pack/vim-trainer/start/trainer/doc"
echo "Then :VimTrainerStart to begin."